#ifndef INTERRUPTMANAGER_H
#define INTERRUPTMANAGER_H

#include <QObject>
#include <QMap>
#include <QVector>

class InterruptHandler {
public:
    virtual void handleInterrupt(int interruptNumber) = 0;
    virtual ~InterruptHandler() {}
};

class InterruptManager : public QObject
{
    Q_OBJECT
public:
    explicit InterruptManager(QObject *parent = nullptr);
    
    void registerInterruptHandler(int interruptNumber, InterruptHandler* handler);
    void triggerInterrupt(int interruptNumber);
    void clearHandlers();
    
private:
    QMap<int, InterruptHandler*> interruptHandlers;
};

#endif // INTERRUPTMANAGER_H    